package com.wanxi.util;

import org.springframework.data.redis.connection.DefaultStringRedisConnection;
import org.springframework.data.redis.connection.RedisConnection;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.data.redis.serializer.RedisSerializer;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : 林子淳
 * @create 2023/3/13 18:56
 */
//public class StringRedisTemplate extends RedisTemplate<String ,String> {
//    public StringRedisTemplate(){
//        this.setKeySerializer(RedisSerializer.string());
//        this.setValueSerializer(RedisSerializer.string());
//        this.setHashKeySerializer(RedisSerializer.string());
//        this.setHashValueSerializer(RedisSerializer.string());
//    }
//    public StringRedisTemplate(RedisConnectionFactory connectionFactory){
//        this();
//        this.setConnectionFactory(connectionFactory);
//        this.afterPropertiesSet();
//    }
//    protected RedisConnection preProcessConnection(RedisConnection connection,boolean existingConnection ){
//        return new DefaultStringRedisConnection(connection);
//    }
//}
